package com.sll.hosptials.model;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 用户组织关联表

 * @TableName user_org
 */
@TableName(value ="user_org")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel("用户组织关联表")
public class UserOrg implements Serializable {

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("用户组织关联id")
    private Long id;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 组织id
     */
    private Long orgId;

    /**
     * 逻辑删除
     */
    @TableLogic
    private Integer deleted;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createDateTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateDateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}